#include "const.h"

void i_strncpy(char *buf, size_t bufn, const char *src, size_t srcn) {
	if (srcn >= bufn)
		i_interrorf("detected overflow (%u >= %u)",
			(unsigned int)srcn, (unsigned int)bufn);

	strncpy(buf, src, srcn);
	buf[srcn] = 0;
}
